package com.budwk.app.sqfwV2.enums;

import lombok.Getter;

/**
 * @BelongsProject: dfxy-shequ
 * @Author: yangweimin
 * @CreateTime: 2024-01-31  16:24
 * @Description: TODO
 */
@Getter
public enum RedWhitePdf {

    RED_TRACKING_REPORT("1", "婚事办理酒席备案", "【婚事办理酒席备案表】合集", "/preview/red-white/dayinglu-tpl-1.jpg"),
    WHITE_INFORMATION_STATISTICS("2", "丧事办理酒席备案", "【丧事办理酒席备案表】合集", "/preview/red-white/dayinglu-tpl-2.jpg"),
    ;

    private String code;
    private String name;
    private String fileName;
    private String img;

    RedWhitePdf(String code, String name, String fileName, String img) {
        this.name = name;
        this.fileName = fileName;
        this.code = code;
        this.img = img;
    }

    public static String getName(String code) {
        for (RedWhitePdf o : RedWhitePdf.values()) {
            if (o.getCode().equals(code)) {
                return o.getName();
            }
        }
        return null;
    }

    public static RedWhitePdf getEnum(String code) {
        for (RedWhitePdf o : RedWhitePdf.values()) {
            if (o.getCode().equals(code)) {
                return o;
            }
        }
        return null;
    }
}
